package com.example.kingdee.sqlTool.sqltoolEnum;

/**
 * 配置表名与主键信息
 */
public enum FormIdEnum {
    /**
     * 聚水潭api的url
     */
    //组合装商品上传（批量上传）
    itemComBineSku("/open/item/combinesku/upload"),
    //普通商品上传（批量上传）
    itemSkuUpload("/open/jushuitan/itemsku/upload"),
    //预约入库上传
    appointMenInUpload("/open/jushuitan/appointmentin/upload"),
    //线下订单上传
    orderUpload("/open/jushuitan/orders/upload"),
    //普通商品查询
    itemSkuQuery("/open/sku/query"),
    //普通商品查询
    categorySkuQuery("/open/category/query"),
    //采购订单查询
    purchaseQuery("/open/purchase/query"),
    //订单查询
    orderQuery("/open/orders/single/query"),
    //售后查询
    refundQuery("/open/refund/single/query"),
    //销售出库查询
    salOutQuery("/open/orders/out/simple/query"),
    //仓库信息查询
    stockQuery("/open/wms/partner/query"),
    //采购退货查询
    purchaseOut("/open/purchaseout/query"),
    //预约入库查询
    appointMenTin("/open/jushuitan/purchasebooking/query"),
    //采购入库查询
    purchaseIn("/open/purchasein/query"),
    /**
     * 星空表单id
     */
    //客户表单id
    bDCustomer("BD_Customer"),
    //生产用料清单id
    prdPpBom("PRD_PPBOM"),
    //生产发料通知单
    prdIsSuemtrNotice("PRD_ISSUEMTRNOTICE"),
    //生产领料清单id
    prdPickMtrl("PRD_PickMtrl"),
    //生产用料清单变更
    ppBomChange("PRD_PPBOMChange"),
    //生产补料清单id
    feedMtrl("PRD_FeedMtrl"),
    //生产退料清单id
    returnMtrl("PRD_ReturnMtrl"),
    //生产订单表单id
    proMo("PRD_MO"),
    //生产入库单表单id
    proInStock("PRD_INSTOCK"),
    //生产汇报单表单id
    proMoRpt("PRD_MORPT"),
    //入库单表单id
    inStock("STK_InStock"),
    //委外用料清单表单id
    supBOM("SUB_PPBOM"),
    //委外领料表单id
    supPickMtr("SUB_PickMtrl"),
    //直接调拨单
    sTKTransferDirect("STK_TransferDirect"),
    //收料通知单表单id
    purReceiveBill("PUR_ReceiveBill"),
    //检验单表单id
    qmInspect("QM_InspectBill"),
    //采购订单表单id
    purchaseOrder("PUR_PurchaseOrder"),
    //采购入库表单id
    stkInStock("STK_InStock"),
    //发货通知表单id
    deliveryRelease("SAL_DELIVERYNOTICE"),
    //退货通知表单id
    returnNotice("SAL_RETURNNOTICE"),
    //销售退货单表单id
    returnStock("SAL_RETURNSTOCK"),
    //采购退料表单id
    purMrb("PUR_MRB"),
    //销售出库单表单id
    salOutStock("SAL_OUTSTOCK"),
    //应收单表单id
    receivable("AR_receivable"),
    //收款单表单id
    receive("AR_RECEIVEBILL"),
    //即时库存表单id
    sTKInventory("STK_Inventory"),
    //销售订单表单id
    salSaleOrder("SAL_SaleOrder"),
    //执行税率表单id
    taxRateTable("kc32d97a6b70b4e59bbabf6a464ae5033"),
    //仓库表单id
    bDStock("BD_STOCK"),
    //应收款汇总表单id
    arSumReport("AR_SumReport"),
    //应付款汇总表单id
    apSumReport("AP_SumReport"),
    //值集资料选择表单id
    bosFlexValueSelect("BOS_FLEXVALUE_SELECT"),
    //物料表单id
    bdMaterial("BD_MATERIAL"),
    //物料分组表单id
    materialGroup("SAL_MATERIALGROUP"),
    //币种表单id
    bDCurrency("BD_Currency"),
    //辅助资料表单id
    bosAssistantData("BOS_ASSISTANTDATA_DETAIL"),
    //结算方式表单id
    settleType("BD_SETTLETYPE"),
    //默认税率表单id
    bDTaxRate("BD_TaxRate"),
    //收款方式表单id
    bDRecCondition("BD_RecCondition"),
    //员工表单id
    bDEmpinfo("BD_Empinfo"),
    //组织机构表单id
    orgOrganizations("ORG_Organizations"),
    //业务员表单id
    bdOPERATOR("BD_OPERATOR"),
    //其他出库表单id
    stkMisDelivery("STK_MisDelivery"),
    //销售员表单id
    bDSaler("BD_Saler"),
    //联系人表单id
    bDCommonContact("BD_CommonContact"),
    //盘盈单表单id
    stkStockCountGain("STK_StockCountGain"),
    //信用额度单id
    creArchives("CRE_CustArchives"),
    //客户信用额度表单id
    customerArchives("k753e7e6a08c846cfb613082f1e04f1a2"),
    //盘亏单表单id
    stkStockCountLoss("STK_StockCountLoss"),
    //盘点记录表单id
    gainRecord("ke288bc57b01d4435b1b8668cdfea2c6e"),
    //价格区域政策表单id
    priceRegion("k55ec3035863b4afd9ed9847e7c028227"),
    //物料分组毛利率表单id
    groupGrossProfitRate("ke1d89304e22f4cc3bffd738372468b3e"),
    //岗位物料分组毛利率表单id
    jobGroupGrossProfitRate("kf904b342d9ec4c65ad5d7176d813565a"),
    //产品销售区域毛利率表单id
    materialGrossProfitRate("kf2a9c861fc0141fa95e72a2a1569046f"),
    //岗位产品区域毛利率表单id
    materialJobGrossProfitRate("k3e85beb0ae6b4f1c9f399a9bcac0d0f1"),
    //产品成本价表单id
    materialCostPrice("k555f24849e754f2eb3b56052664939d5"),
    //价格区域政策表单id
    materialUnitConvert("BD_MATERIALUNITCONVERT"),
    //sqltool演示表
    sqlToolDemo("BD_MATERIAL");


    /**
     * 表默认字段设置
     */

    public final String value;
    FormIdEnum(String value) {
        this.value = value;
    }

    public static String getDBTableName(String formId){
        for(FormIdEnum tn: FormIdEnum.values()){
            if(tn.toString().equals(formId)){
                return tn.value.split(",")[0];
            }
        }
        return formId;
    }

}
